home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 11365 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.1 KB

  1. Path: ix.netcom.com!netnews
  2. From: jdadson@ix.netcom.com(Jive Dadson )
  3. Newsgroups: comp.lang.c
  4. Subject: Re: Why is C faster than FORTRAN?
  5. Date: 23 Mar 1996 08:22:45 GMT
  6. Organization: Netcom
  7. Message-ID: <4j0ccl$8na@cloner3.netcom.com>
  8. References: <1996Mar20.132506.91237@ucl.ac.uk>
  9. NNTP-Posting-Host: ple-ca11-24.ix.netcom.com
  10. X-NETCOM-Date: Sat Mar 23 12:22:45 AM PST 1996
  11.  
  12.  
  13.  
  14. >In article <4i4poj$j7e@thorn.cc.usm.edu>, sakalauk@coam.usm.edu (Peter
  15. >Sakalaukus) writes:
  16. > I have two programs, FORTRAN and C. They both use the same algorithm
  17. to
  18. > manipulate numeric data. The larger the data file though, the faster
  19. the
  20. > C version is, (in relation to the FORTARN program). I am running on a
  21. UNIX
  22. > platform. 
  23.  
  24. FORTRAN and C organizes multi-dimensional arrays in different orders.
  25. If your program accesses large matrixes with the inner loop indexing
  26. over the columns, that could be the difference. Or it could just be
  27. that your UNIX box has a better C compiler than FORTRAN compiler.
  28. Or as someone pointed out, the FORTRAN runtime support (file I/O
  29. for example) may be poorly written.
  30.  
  31.              Jive
  32.  
  33.